package com.jk1.bianligou.blg.exception;

import com.jk1.bianligou.blg.common.ErrorCode;
import lombok.Getter;

/**
 * @author WHH
 */
@Getter
public class BizException extends RuntimeException{

    private Integer code;

    public BizException(String message, int code) {
        super(message);
        this.code = code;
    }
    public BizException(ErrorCode code) {
        this(code.getMessage(),code.getCode());
        this.code = code.getCode();
    }

    public BizException(ErrorCode code, String message) {
        super(message);
        this.code = code.getCode();
    }

}
